WORK_SPACE_FILES=$(shell ls ./)
WORK_SPACE_DIRS=$(foreach n,$(WORK_SPACE_FILES),$(shell if [ -d $(n) ]; then echo $(n); fi;))
$(info WORK_SPACE_DIRS = $(WORK_SPACE_DIRS))

define make_subdir
	@for subdir in $(WORK_SPACE_DIRS);do \
		if [ -f $$subdir/Makefile ]; then \
			echo ""; \
			echo ">>>>>make in dir: make -C $$subdir $1>>>>: "; \
			make -C $$subdir $1 || exit $$?; \
		else \
			echo ""; \
			echo "===dir have not Make: make -C $$subdir $1==: "; \
		fi; \
	done
endef
 
all:
	$(call make_subdir,)
clean:
	$(call make_subdir,clean)